Skip to content

fix: restrict EFI partition permissions with fmask/dmask=0077#4506

Open
0xdeadd wants to merge 1 commit intoarchlinux:masterfrom
0xdeadd:fix/efi-random-seed-permissions
Open

fix: restrict EFI partition permissions with fmask/dmask=0077#4506
0xdeadd wants to merge 1 commit intoarchlinux:masterfrom
0xdeadd:fix/efi-random-seed-permissions

Conversation

@0xdeadd
Copy link
Copy Markdown

@0xdeadd 0xdeadd commented Apr 30, 2026

Summary

  • Mount the ESP with fmask=0077 and dmask=0077 to prevent world-readable files like /efi/loader/random-seed
  • Options are added at mount time in _mount_partition() and carried into the installed system via genfstab
  • Existing user-specified mount options are preserved; the restrictive masks are only appended if not already present

Closes #4241

Test plan

  • Install with default EFI partition layout, verify /efi/loader/random-seed is not world-readable
  • Verify fstab entry for ESP includes fmask=0077,dmask=0077
  • Install with custom mount options on EFI partition, verify no duplicate fmask/dmask entries

Mount the ESP with fmask=0077 and dmask=0077 to prevent world-readable
files like /efi/loader/random-seed.

Closes archlinux#4241
@0xdeadd 0xdeadd requested a review from Torxed as a code owner April 30, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/efi/loader/random-seed is world readable

1 participant